package com.xja.house.ssm.service.impl;

import com.xja.house.ssm.entity.House;
import com.xja.house.ssm.mapper.HouseMapper;
import com.xja.house.ssm.service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("houseService")
public class HouseServiceImpl implements HouseService {
    @Autowired
    private HouseMapper houseMapper;
    public void addHouse(House house) throws Exception {
        houseMapper.insert(house);
    }

    public List<House> guanliSelectAll() throws Exception {
        return houseMapper.guanliSelectAll();
    }

    public List<House> selectAll() {
        return houseMapper.selectAll();
    }

    public House selectById(Integer id) {
        return houseMapper.selectByPrimaryKey(id);
    }
}
